<%@ page import="myoa.Role" %>
<html>
<head>
    <meta name="layout" content="freshmade">
</head>

<body>
<div id="content-wrapper">
    <div class="center-wrapper">
        <div class="content">
            <div id="main">
                <div class="post">
                    <div class="post-title">
                        <h1><g:message code="user.info"/></h1>
                        <g:message code="user.info.create"/>
                        <g:render template="/template/messageBar"/>
                    </div>

                    <div class="post-date">
                        <g:message code="user.info.desc2"/>
                    </div>
                </div>

                <g:form action="save" method="post">
                    <div id="myform">
                        <div class="field">
                            <div class="key"><g:message code="user.name"/></div>

                            <div class="value">
                                <g:textField name="name"/>
                            </div>

                            <div class="hint">
                                区分大小写
                                <br/>建议规范：英文名字（如Calvin）、两个字的中文（LiRan）、三个字的拼音（如HuangCX）
                            </div>

                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="user.password"/></div>

                            <div class="value">
                                <g:passwordField name="password"/>
                            </div>

                            <div class="hint">
                                用户第一次登陆强制其重置
                            </div>

                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="user.roles"/></div>

                            <div class="value">
                                <g:select multiple="multiple" name="roles"
                                          from="${Role.list()}" optionValue="name" optionKey="id"/>
                            </div>

                            <div class="hint">
                                基于角色的访问控制
                            </div>

                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="user.fullName"/></div>

                            <div class="value">
                                <g:textField name="fullName"/>
                            </div>
                            <div class="clear"></div>
                        </div>

                        <div class="field">
                            <div class="key"><g:message code="user.tel"/></div>

                            <div class="value">
                                <g:textField name="tel"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="field">
                            <div class="key"><g:message code="user.email"/></div>

                            <div class="value">
                                <g:textField name="email"/>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="buttonbar">
                            <input type="submit" class="button" value="Submit"/>
                            <input type="reset" class="button" value="Reset"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>